/**
 * 权限相关的数据
 * Created by gcc on 2017/9/29.
 */
import Vue from "vue";

// 页码相关
let page = {
  total: 1,
  startIndex: 0,
  stepNumber: 20,
  currentPage: 1
};

//页面状态相关
let status = {
  //删除员工的 modal
  modalClear: {
    isShow: false,
    isLoading: false,
  },

};

// 和网络交互相关的参数
let params = {
  //搜索条件
  userName:'',
  functionName:'',
  startTime:"",
  endTime:"",
};

// 页面的数据源
let data = {
  historyList: [],
  dateRange: {
    disabledDate (date) {
      return date && date.valueOf() > Date.now() - 86400000;
    },
    shortcuts: [
      {
        text: '清空时间',
        value () {
          return [];
        }
      },
      {
        text: '最近一周',
        value () {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
          return [start, end];
        }
      },
      {
        text: '最近一个月',
        value () {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
          return [start, end];
        }
      },
      {
        text: '最近三个月',
        value () {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
          return [start, end];
        }
      }
    ]
  }
};



export  default  {
  tPage: page,
  tStatus: status,
  tParams: params,
  tData: data
};
